import Vue from 'vue'
import VueRouter from 'vue-router'
import login from '../views/login/index.vue'
import home from '../views/home/index.vue'
import company from '../views/company/index.vue'
import exercise from '../views/exercise/index.vue'
import discover from '../views/discover/index.vue'
import my from '../views/my/index.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/login',
    name: 'login',
    component: login
  },
  {
    path: '/',
    name: 'home',
    component: home,
    children: [
      {
        path: "/company",
        name: 'company',
        component: company
      },
      {
        path: "/exercise",
        name: 'exercise',
        component: exercise
      },
      {
        path: "/discover",
        name: 'discover',
        component: discover
      },
      {
        path: "/my",
        name: 'my',
        component: my
      },

    ]
  },
]

const router = new VueRouter({
  routes
})

export default router
